.class Lcom/example/m6shop/GoodsShowActivity$9;
.super Ljava/lang/Thread;
.source "GoodsShowActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/m6shop/GoodsShowActivity;->getggSource()Z
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/m6shop/GoodsShowActivity;


# direct methods
.method constructor <init>(Lcom/example/m6shop/GoodsShowActivity;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/m6shop/GoodsShowActivity$9;->this$0:Lcom/example/m6shop/GoodsShowActivity;

    .line 991
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 17

    .prologue
    .line 993
    invoke-super/range {p0 .. p0}, Ljava/lang/Thread;->run()V

    .line 996
    new-instance v8, Landroid/os/Message;

    invoke-direct {v8}, Landroid/os/Message;-><init>()V

    .line 998
    .local v8, "msg":Landroid/os/Message;
    sget-object v14, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v15, "\u5f00\u59cb\u6293\u53d6\u6570\u636e---"

    invoke-virtual {v14, v15}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 999
    move-object/from16 v0, p0

    iget-object v14, v0, Lcom/example/m6shop/GoodsShowActivity$9;->this$0:Lcom/example/m6shop/GoodsShowActivity;

    .line 1000
    const-string v15, "userInfo"

    const/16 v16, 0x0

    .line 999
    invoke-virtual/range {v14 .. v16}, Lcom/example/m6shop/GoodsShowActivity;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v10

    .line 1001
    .local v10, "preferences":Landroid/content/SharedPreferences;
    const-string v14, "uid"

    const-string v15, ""

    invoke-interface {v10, v14, v15}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 1002
    .local v1, "account":Ljava/lang/String;
    const-string v14, "pass"

    const-string v15, ""

    invoke-interface {v10, v14, v15}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    .line 1003
    .local v9, "password":Ljava/lang/String;
    if-eqz v1, :cond_0

    const-string v14, ""

    invoke-virtual {v1, v14}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v14

    if-eqz v14, :cond_1

    .line 1004
    :cond_0
    invoke-static {}, Lmyclass/Util;->dismisDialog()V

    .line 1005
    const-string v14, "nologin"

    iput-object v14, v8, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 1006
    const/4 v14, 0x1

    iput v14, v8, Landroid/os/Message;->arg1:I

    .line 1007
    sget-object v14, Lcom/example/m6shop/GoodsShowActivity;->h:Landroid/os/Handler;

    invoke-virtual {v14, v8}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 1067
    :goto_0
    return-void

    .line 1011
    :cond_1
    new-instance v14, Ljava/lang/StringBuilder;

    move-object/from16 v0, p0

    iget-object v15, v0, Lcom/example/m6shop/GoodsShowActivity$9;->this$0:Lcom/example/m6shop/GoodsShowActivity;

    iget-object v15, v15, Lcom/example/m6shop/GoodsShowActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v15}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v15

    invoke-static {v15}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v15

    invoke-direct {v14, v15}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 1012
    const-string v15, "/index.php?ctrl=app&action=onegoods&uid="

    invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v14

    .line 1013
    invoke-virtual {v14, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v14

    const-string v15, "&pwd="

    invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v14

    invoke-virtual {v14, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v14

    const-string v15, "&id="

    invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v14

    move-object/from16 v0, p0

    iget-object v15, v0, Lcom/example/m6shop/GoodsShowActivity$9;->this$0:Lcom/example/m6shop/GoodsShowActivity;

    iget-object v15, v15, Lcom/example/m6shop/GoodsShowActivity;->goodsid:Ljava/lang/String;

    invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v14

    .line 1014
    const-string v15, "&datatype=json"

    invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v14

    .line 1011
    invoke-virtual {v14}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    .line 1015
    .local v13, "url":Ljava/lang/String;
    sget-object v14, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v15, Ljava/lang/StringBuilder;

    const-string v16, "\u83b7\u53d6\u89c4\u683c\u6570\u636e----------------------------"

    invoke-direct/range {v15 .. v16}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v15, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    invoke-virtual {v15}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v15

    invoke-virtual {v14, v15}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 1016
    invoke-static {v13}, Lmyclass/HttpConn;->getStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v12

    .line 1017
    .local v12, "str":Ljava/lang/String;
    sget-object v14, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v15, Ljava/lang/StringBuilder;

    const-string v16, "\u8fd4\u56de\u6570\u636egg---------------"

    invoke-direct/range {v15 .. v16}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v15, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    invoke-virtual {v15}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v15

    invoke-virtual {v14, v15}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 1020
    :try_start_0
    new-instance v6, Lorg/json/JSONObject;

    invoke-direct {v6, v12}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 1022
    .local v6, "json":Lorg/json/JSONObject;
    const-string v14, "error"

    invoke-virtual {v6, v14}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v14

    const-string v15, "true"

    invoke-virtual {v14, v15}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v14

    if-eqz v14, :cond_2

    .line 1023
    invoke-static {}, Lmyclass/Util;->dismisDialog()V

    .line 1025
    const-string v14, "msg"

    invoke-virtual {v6, v14}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v14

    iput-object v14, v8, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 1026
    const/4 v14, 0x1

    iput v14, v8, Landroid/os/Message;->arg1:I

    .line 1027
    sget-object v14, Lcom/example/m6shop/GoodsShowActivity;->h:Landroid/os/Handler;

    invoke-virtual {v14, v8}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto/16 :goto_0

    .line 1059
    .end local v6    # "json":Lorg/json/JSONObject;
    :catch_0
    move-exception v2

    .line 1061
    .local v2, "e":Lorg/json/JSONException;
    invoke-virtual {v2}, Lorg/json/JSONException;->printStackTrace()V

    .line 1062
    invoke-static {}, Lmyclass/Util;->dismisDialog()V

    .line 1064
    const/4 v14, 0x4

    iput v14, v8, Landroid/os/Message;->arg1:I

    .line 1065
    sget-object v14, Lcom/example/m6shop/GoodsShowActivity;->h:Landroid/os/Handler;

    invoke-virtual {v14, v8}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto/16 :goto_0

    .line 1030
    .end local v2    # "e":Lorg/json/JSONException;
    .restart local v6    # "json":Lorg/json/JSONObject;
    :cond_2
    :try_start_1
    const-string v14, "msg"

    invoke-virtual {v6, v14}, Lorg/json/JSONObject;->isNull(Ljava/lang/String;)Z

    move-result v14

    if-eqz v14, :cond_3

    .line 1031
    invoke-static {}, Lmyclass/Util;->dismisDialog()V

    .line 1032
    const/4 v14, 0x2

    iput v14, v8, Landroid/os/Message;->arg1:I

    .line 1033
    sget-object v14, Lcom/example/m6shop/GoodsShowActivity;->h:Landroid/os/Handler;

    invoke-virtual {v14, v8}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto/16 :goto_0

    .line 1036
    :cond_3
    const-string v14, "msg"

    invoke-virtual {v6, v14}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v7

    .line 1037
    .local v7, "ms":Lorg/json/JSONObject;
    const-string v14, "goodsinfo"

    invoke-virtual {v7, v14}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v3

    .line 1040
    .local v3, "goodsinfo":Lorg/json/JSONObject;
    move-object/from16 v0, p0

    iget-object v14, v0, Lcom/example/m6shop/GoodsShowActivity$9;->this$0:Lcom/example/m6shop/GoodsShowActivity;

    const-string v15, "bagcost"

    invoke-virtual {v3, v15}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v15

    iput-object v15, v14, Lcom/example/m6shop/GoodsShowActivity;->bagcost:Ljava/lang/String;

    .line 1042
    const-string v14, "productlist"

    invoke-virtual {v7, v14}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v5

    .line 1043
    .local v5, "jpro":Lorg/json/JSONArray;
    move-object/from16 v0, p0

    iget-object v14, v0, Lcom/example/m6shop/GoodsShowActivity$9;->this$0:Lcom/example/m6shop/GoodsShowActivity;

    new-instance v15, Ljava/util/ArrayList;

    invoke-direct {v15}, Ljava/util/ArrayList;-><init>()V

    iput-object v15, v14, Lcom/example/m6shop/GoodsShowActivity;->lsp:Ljava/util/List;

    .line 1044
    const/4 v4, 0x0

    .local v4, "i":I
    :goto_1
    invoke-virtual {v5}, Lorg/json/JSONArray;->length()I

    move-result v14

    if-lt v4, v14, :cond_4

    .line 1053
    invoke-static {}, Lmyclass/Util;->dismisDialog()V

    .line 1054
    move-object/from16 v0, p0

    iget-object v14, v0, Lcom/example/m6shop/GoodsShowActivity$9;->this$0:Lcom/example/m6shop/GoodsShowActivity;

    invoke-static {v14, v12}, Lcom/example/m6shop/GoodsShowActivity;->access$5(Lcom/example/m6shop/GoodsShowActivity;Ljava/lang/String;)V

    .line 1055
    const/16 v14, 0x1e

    iput v14, v8, Landroid/os/Message;->arg1:I

    .line 1056
    sget-object v14, Lcom/example/m6shop/GoodsShowActivity;->h:Landroid/os/Handler;

    invoke-virtual {v14, v8}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto/16 :goto_0

    .line 1045
    :cond_4
    new-instance v11, Lbean/ProBean;

    invoke-direct {v11}, Lbean/ProBean;-><init>()V

    .line 1046
    .local v11, "pro":Lbean/ProBean;
    invoke-virtual {v5, v4}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v14

    const-string v15, "id"

    invoke-virtual {v14, v15}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v14

    invoke-virtual {v11, v14}, Lbean/ProBean;->setId(Ljava/lang/String;)V

    .line 1047
    invoke-virtual {v5, v4}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v14

    const-string v15, "attrname"

    invoke-virtual {v14, v15}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v14

    invoke-virtual {v11, v14}, Lbean/ProBean;->setName(Ljava/lang/String;)V

    .line 1048
    invoke-virtual {v5, v4}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v14

    const-string v15, "stock"

    invoke-virtual {v14, v15}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v14

    invoke-virtual {v11, v14}, Lbean/ProBean;->setStock(Ljava/lang/String;)V

    .line 1049
    invoke-virtual {v5, v4}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v14

    const-string v15, "cost"

    invoke-virtual {v14, v15}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v14

    invoke-virtual {v11, v14}, Lbean/ProBean;->setCost(Ljava/lang/String;)V

    .line 1050
    move-object/from16 v0, p0

    iget-object v14, v0, Lcom/example/m6shop/GoodsShowActivity$9;->this$0:Lcom/example/m6shop/GoodsShowActivity;

    iget-object v14, v14, Lcom/example/m6shop/GoodsShowActivity;->lsp:Ljava/util/List;

    invoke-interface {v14, v11}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    .line 1044
    add-int/lit8 v4, v4, 0x1

    goto :goto_1
.end method

.method public declared-synchronized start()V
    .locals 1

    .prologue
    .line 1070
    monitor-enter p0

    :try_start_0
    invoke-super {p0}, Ljava/lang/Thread;->start()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 1071
    monitor-exit p0

    return-void

    .line 1070
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
